﻿
@{
    Layout = null;
}
@model WebSiteEntity.WebSite
<!DOCTYPE html>
<html>
<!-- Mirrored from www.zi-han.net/theme/hplus/form_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:15 GMT -->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebSite-基本表单</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
    <link href="favicon.ico" rel="shortcut icon">
    <link href="~/Content/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="~/Content/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="~/Content/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="~/Content/css/animate.min.css" rel="stylesheet">
    <link href="~/Content/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="~/Content/plugins/summernote/summernote.css" rel="stylesheet" />
    @*<link href="~/Content/css/plugins/summernote/summernote.css" rel="stylesheet">*@
    <link href="~/Content/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <form method="post" class="form-horizontal" enctype="multipart/form-data" >
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h3>网站基本信息设置</h3>
                        </div>
                        <div class="ibox-content">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">网站名称</label>
                                <div class="col-sm-4">
                                    @*<input type="text" class="form-control" name="Name" value="" />*@
                                    @Html.TextBoxFor(model => model.Name, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">网站URL</label>
                                <div class="col-sm-4">
                                    @*<input type="text" class="form-control" name="WebUrl">*@
                                    @Html.TextBoxFor(model => model.WebUrl, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">网站Logo</label>
                                <div class="col-sm-4">
                                    <input type="file" name="WebLogo" />
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">网站Icon</label>
                                <div class="col-sm-4">
                                    <input type="file" name="WebIcon" />
                                </div>
                            </div>
                        </div>
                        <div class="ibox-title">
                            <h3>SEO优化</h3>
                        </div>
                        <div class="ibox-content">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">Title</label>
                                <div class="col-sm-4">
                                    @Html.TextBoxFor(model => model.Title, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">关键词</label>
                                <div class="col-sm-4">
                                    @Html.TextBoxFor(model => model.Keyword, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">描述</label>
                                <div class="col-sm-4">
                                    @Html.TextAreaFor(model => model.Description, new { @class = "form-control" })
                                </div>
                            </div>
                        </div>
                        <div class="ibox-title">
                            <h3>底部信息设置（显示在网站前台底部）</h3>
                        </div>
                        <div class="ibox-content">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">版权信息</label>
                                <div class="col-sm-4">
                                    @Html.TextBoxFor(model => model.Copyright, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">地址</label>
                                <div class="col-sm-4">
                                    @Html.TextBoxFor(model => model.Place, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">邮箱</label>
                                <div class="col-sm-4">
                                    @Html.TextBoxFor(model => model.Email, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">联系电话</label>
                                <div class="col-sm-4">
                                    @Html.TextBoxFor(model => model.Phone, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">邮编</label>
                                <div class="col-sm-4">
                                    @Html.TextBoxFor(model => model.ZipCode, new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">其他</label>
                                <div class="col-sm-10">
                                    <div id="OtherSummernote"></div>
                                </div>
                                @Html.HiddenFor(model=>model.Others)
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button id="btnSave" class="btn btn-sm btn-primary" type="button">保存内容</button>
                                    <button class="btn btn-sm btn-white" type="button">取消</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    @Html.HiddenFor(model => model.Id)
                </form>
            </div>
        </div>
    </div>


    <script src="~/Content/js/jquery.min.js?v=2.1.4"></script>
    <script src="~/Content/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="~/Content/js/content.min.js?v=1.0.0"></script>
    <script src="~/Content/js/plugins/iCheck/icheck.min.js"></script>
    <script src="~/Content/plugins/summernote/summernote.min.js"></script>
    <script src="~/Content/plugins/summernote/lang/summernote-zh-CN.js"></script>
    <script>
        $(document).ready(
            function () {
                $('#OtherSummernote').summernote({
                    lang: "zh-CN", height: "150px",
                    toolbar: [
                        // [groupName, [list of button]]
                        ['style', ['bold', 'italic', 'underline', 'clear']],
                        ['font', ['strikethrough', 'superscript', 'subscript']],
                        ['fontsize', ['fontsize']],
                        ['color', ['color']],
                        ['para', ['ul', 'ol', 'paragraph']],
                        ['height', ['height']]
                    ]
                });
                $(".i-checks").iCheck(
                    {
                        checkboxClass: "icheckbox_square-green",
                        radioClass: "iradio_square-green",
                    });
                ///提交按钮
                $("#btnSave").bind("click", function () {
                    var form = $("form");
                    var actionUrl = "/WebSite/AddOrUpdate";
                    form.attr("action", actionUrl);
                    var markupStr = $('#OtherSummernote').summernote('code');
                    $("#Others").val(markupStr);
                    form.submit();
                })

                //给富文本编辑器设置值
                $('#OtherSummernote').summernote('code', $("#Others").val());

            });
    </script>
</body>


</html>
